package top.shaoxia.pwdm.repositories;

import org.springframework.data.domain.Sort;
import org.springframework.data.repository.CrudRepository;
import top.shaoxia.pwdm.pojo.PwdmDetailsDO;

import java.util.List;

/**
 * @author wjc
 * @date 2022/2/19
 */
public interface PwdmDetailsRepository extends CrudRepository<PwdmDetailsDO, Integer> {

    List<PwdmDetailsDO> findByDeleted(Byte deleted, Sort sort);

    List<PwdmDetailsDO> findByFolderIdAndDeletedOrderBySnDesc(Integer folderId, Byte deleted);

    List<PwdmDetailsDO> findByFolderIdOrderBySnDesc(Integer folderId);

    List<PwdmDetailsDO> findByDeletedOrderBySnDescFolderIdDesc(Byte deleted);

    List<PwdmDetailsDO> findByStarOrderBySnDesc(Byte star);

}
